﻿using System;
using System.Collections.Generic;
using System.Diagnostics.Contracts;
using System.Linq;
using System.Xml;
using XmlStudio.DataLayer;
using XmlStudio.Exceptions;

namespace XmlStudio.Interfaces {
    ///// <summary>
    ///// Contract class for IBigXmlReader interface.
    ///// </summary>
    //[ContractClassFor(typeof(IBigXmlReader))]
    //internal class BigXmlReaderContract : IBigXmlReader {
    //    #region Properties
    //    bool IBigXmlReader.Opened {
    //        get { return default(bool); }
    //    }

    //    string IBigXmlReader.Path {
    //        get { return default(string); }
    //    }

    //    XmlDocument IBigXmlReader.XmlDocument {
    //        get { return default(XmlDocument); }
    //    }
    //    #endregion

    //    #region Methods
    //    int IBigXmlReader.GetChildCount(int[] address) {
    //        Contract.Requires<ArgumentException>(Contract.ForAll(address, i => i >= 0), "address");
    //        Contract.Requires<BadBigXmlReaderStateException>(((IBigXmlReader)this).Opened == false);
    //        Contract.Ensures(((IBigXmlReader)this).Opened == false);

    //        return default(int);
    //    }

    //    IEnumerable<BigXmlNodeInternal> IBigXmlReader.GetChildNodes(int[] address, string range) {
    //        Contract.Requires<ArgumentException>(Contract.ForAll(address, i => i >= 0), "address");
    //        Contract.Requires<BadBigXmlReaderStateException>(((IBigXmlReader)this).Opened == false);
    //        Contract.Ensures(((IBigXmlReader)this).Opened == false);

    //        return default(IEnumerable<BigXmlNodeInternal>);
    //    }

    //    IEnumerable<BigXmlNodeInternal> IBigXmlReader.GetChildNodes(int[] address, IEnumerable<int> range) {
    //        Contract.Requires<BadBigXmlReaderStateException>(((IBigXmlReader)this).Opened == false);
    //        Contract.Requires<ArgumentException>(Contract.ForAll(address, i => i >= 0), "address");
    //        Contract.Requires<ArgumentException>(range.Count() >= 0, "range");
    //        Contract.Ensures(((IBigXmlReader)this).Opened == false);


    //        return default(IEnumerable<BigXmlNodeInternal>);
    //    }

    //    BigXmlNodeInternal IBigXmlReader.GetRootElement() {
    //        Contract.Requires<BadBigXmlReaderStateException>(((IBigXmlReader)this).Opened == false);
    //        Contract.Ensures(((IBigXmlReader)this).Opened == false);

    //        return default(BigXmlNodeInternal);
    //    }

    //    void IBigXmlReader.CheckWellFormedness() {
    //        Contract.Requires<BadBigXmlReaderStateException>(((IBigXmlReader)this).Opened == false);
    //        Contract.Requires<ArgumentException>(!string.IsNullOrEmpty(((IBigXmlReader)this).Path), "Path");
    //        Contract.Ensures(((IBigXmlReader)this).Opened == false);
    //    }

    //    BigXmlNodeInternal IBigXmlReader.GetAllFromAddress(int[] address) {
    //        return default(BigXmlNodeInternal);
    //    }

    //    void IBigXmlReader.WriteChildNodesFromAddress(int[] address, XmlWriter writer) {
    //    }

    //    XmlDocumentType IBigXmlReader.GetDocumentType() {
    //        return default(XmlDocumentType);
    //    }
    //    #endregion
    //}
}
